<%@include file="../../generic/inc/head.jsp"%>

<script>
function displayEntry(id) {
	document.forms["entryListForm"].method.value='displayEntry';
	document.forms["entryListForm"].entryId.value=id;
	document.forms["entryListForm"].submit();
}

function create(title) {
	document.forms["entryListForm"].method.value='createEntry';
	document.forms["entryListForm"].searchString.value=title;
	document.forms["entryListForm"].submit();
}
</script>

<div id="mainPanel">
	<html:form action="entryList">
		<html:hidden property="method" value="" />
		<html:hidden property="entryId" value="" />
		<html:hidden property="searchString"/>
		
		<ul>
			<logic:iterate id="linkToEntry" name="entryListForm"
				property="linksToEntries">
				<li>
					<a href="javascript:displayEntry(<bean:write property="id" name="linkToEntry"/>);">
						<bean:write property="title" name="linkToEntry" />
					</a>
				</li>
			</logic:iterate>
		</ul>
		
		<a href="javascript:create('<bean:write property="searchString" name="entryListForm"/>');">
			<bean:message key="entry.list.create"/>: 
			<bean:write property="searchString" name="entryListForm"/>
		</a>
	</html:form>
</div>

<%@include file="../../generic/inc/foot.jsp"%>